package com.fubowen.lepton.db.bean

import androidx.room.Entity
import androidx.room.Index
import androidx.room.PrimaryKey
import com.fubowen.lepton.conf.AnnotationConfig

@Entity(indices = [Index(value = ["url"], unique = true)])
data class VisitedBean @JvmOverloads constructor(
    @PrimaryKey(autoGenerate = true)
    var id: Int = 0,
    var title: String? = "",
    var url: String? = "",
    var host: String? = "",
    var icon: String? = "",
    var timestamp: Long = System.currentTimeMillis(),
    @AnnotationConfig.IconSource
    var iconSource: Int = AnnotationConfig.ICON_SOURCE_URL,
    var selectable: Boolean = false,
    var isSelected: Boolean = false,
) {
    companion object {
        const val TTL = "visited-ttl"
    }
}

